package com.zzl.admin.controller.hello;

import com.zzl.admin.service.hello.HelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * description: 入门Controller
 * @author 朱正磊
 * @date 2021-09-23 11:14:33
 */
@RestController
public class HelloController {

    private final HelloService helloService;

    public HelloController(HelloService helloService) {
        this.helloService = helloService;
    }

    /**
     * description: 打招呼
     * @author 朱正磊
     * @date 2021-09-23 11:24:13
     * @param name 姓名
     * @return 返回打招呼内容
     */
    @GetMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name) {
        return helloService.hello(name);
    }

}
